<!--
  Generated template for the OrderdetailPage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>

  <ion-navbar color="primary">
    <ion-title>订单详情</ion-title>
  </ion-navbar>

</ion-header>


<ion-content padding>
  <ion-item>
    <ion-label class="item-label">类型</ion-label>
    <ion-label class="item-value">{{order.typedes}}</ion-label>
  </ion-item>
  <ion-item>
    <ion-label class="item-label">标题</ion-label>
    <ion-label class="item-value">{{order.title}}</ion-label>
  </ion-item>
  <ion-item>
    <ion-textarea cols="30" readonly="true" rows="10" style="border: solid 0.5px #999" [(ngModel)]="order.des">
    </ion-textarea>
  </ion-item>
  <ion-item>
    <ion-label class="item-label">地址</ion-label>
    <ion-label class="item-value">{{order.address}}</ion-label>
  </ion-item>
  <ion-item>
    <ion-label class="item-label">电话</ion-label>
    <ion-label class="item-value">{{order.phone}}</ion-label>
  </ion-item>
  <ion-item>
    <ion-label class="item-label">发单者姓名</ion-label>
    <ion-label class="item-value">{{order.sendername}}</ion-label>
  </ion-item>
  <ion-item>
    <ion-label class="item-label">发单时间</ion-label>
    <ion-label class="item-value">{{order.sendtime}}</ion-label>
  </ion-item>
  <ion-item>
    <ion-label class="item-label">状态</ion-label>
    <ion-label class="item-value">{{order.status}}</ion-label>
  </ion-item>
  <ion-item *ngIf="order.resvername!=null">
    <ion-label class="item-label">接单者姓名</ion-label>
    <ion-label class="item-value">{{order.resvername}}</ion-label>
  </ion-item>
  <ion-item *ngIf="order.resvtiem!=null">
    <ion-label class="item-label">接单时间</ion-label>
    <ion-label class="item-value">{{order.resvtiem}}</ion-label>
  </ion-item>
  <ion-item *ngIf="order.resverphone!=null">
    <ion-label class="item-label">接单者电话</ion-label>
    <ion-label class="item-value">{{order.resverphone}}</ion-label>
  </ion-item>
  <ion-item *ngIf="order.resveraddress!=null">
    <ion-label class="item-label">接单者地址</ion-label>
    <ion-label class="item-value">{{order.resveraddress}}</ion-label>
  </ion-item>
  <ion-label text-center style="color:red;" *ngIf="order.status=='已完成'&&order.star==null" >待评价</ion-label>
  <rating *ngIf="order.status=='已完成'&&order.star!=null" [(ngModel)]="rate" readOnly="false" max="5" emptyStarIconName="star-outline" halfStarIconName="star-half"
    starIconName="star" nullable="false">
  </rating>
  <ion-textarea *ngIf="order.status=='已完成'&&order.star!=null" cols="30" rows="10" style="border: solid 1px blue" [(ngModel)]="pjxx">
  </ion-textarea>
</ion-content>
<ion-footer>
  <button *ngIf="order.resvername==null" ion-button block (click)="jiedan()">接单</button>
  <button *ngIf="order.resvername!=null&&order.status!='已完成'" ion-button block (click)="completeOrder()">完成</button>
</ion-footer>
